<!--
 * @Author: 一路向阳 tt_sunzhenfeng@163.com
 * @Date: 2024-05-30 21:41:54
 * @LastEditors: 一路向阳 tt_sunzhenfeng@163.com
 * @LastEditTime: 2024-05-31 15:05:12
 * @FilePath: \vue3_nuxt_demo\components\NavMain.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <a-col :span="15" class="note-list-container">
    <template v-for="(item, index) in notes" :key="item.id">
      <NoteItem :note="item" :index="index" />
    </template>
  </a-col>
</template>



<script setup>
import NoteItem from './NoteItem.vue';

import { notesList } from '@/apis/home';


// 文集列表配置
const notes = ref([]);
const pageConfig = reactive({
  loading: false
});

// 初始化文集列表
const initLoadNotes = async () => {
  pageConfig.loading = true;
  const { data } = await notesList().finally(() => pageConfig.loading = false);

  if (data?.data) {
    notes.value = data?.data;
  }
}


onMounted(() => initLoadNotes());
</script>


<style lang="less" scoped>
.note-list-container {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
}

::-webkit-scrollbar {
  display: none;
}
</style>